package com.hkd.cya.状态模式;

public class BlueState extends AbstractState {

    public BlueState(Student student) {

        super(student);

        stateName = "蓝色";

    }



    @Override

    public void checkState() {

        if (student.getAccountPoints() > 100) {

            //补全代码6
            student.setState(new GreenState(student));



        } else if (student.getAccountPoints() < 0) {

            //补全代码7
                student.setState(new YellowState(student));


        }

    }

}


